class Animal(object):
    def run(self):
        print('Animal is running...')

    def eat(self):
        print('Eating meat...')

class Dog(Animal):

    def run(self):
        print('Dog is running...')

class Cat(Animal):

    def run(self):
        print('Cat is running...')

dog = Dog()
dog.run()
dog.eat()
cat = Cat()
cat.run()


a = list() # a是list类型
b = Animal() # b是Animal类型
c = Dog() # c是Dog类型

isinstance(a, list)
# print(isinstance(a, list))
# True
isinstance(b, Animal)
# True
isinstance(c, Dog)
# True

def run_twice(animal):
    animal.run()
    animal.run()

run_twice(Animal())
# Animal is running...
# Animal is running...

run_twice(Dog())

print(dir('abbc'))

